﻿<phone:PhoneApplicationPage 
    x:Class="CarBloke.Pages.VehicleEditPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=Strings.ApplicationTitle, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=Strings._new, Source={StaticResource LanguageProvider}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel-->
        <ScrollViewer x:Name="ContentGrid" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel>
                <TextBlock x:Name="nameTextBlock" Text="{Binding Path=Strings._name, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="nameTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="nameBorder" BorderThickness="0">
                    <TextBox x:Name="nameTextBox" TextChanged="nameTextBox_TextChanged"/>
                </Border>
                <TextBlock x:Name="yearTextBlock" Text="{Binding Path=Strings._year, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="yearTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="yearBorder" BorderThickness="0">
                    <TextBox x:Name="yearTextBox" InputScope="Number" TextChanged="yearTextBox_TextChanged"/>
                </Border>
                <TextBlock x:Name="notesTextBlock" Text="{Binding Path=Strings._notes, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="notesTextBlock_MouseLeftButtonUp"/>
                <TextBox x:Name="notesTextBox" AcceptsReturn="True"/>
            </StackPanel>
        </ScrollViewer>
    </Grid>

    <!-- ApplicationBar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_saveButton" IconUri="/Images/AppBar/save.png" Text="save" Click="appbar_saveButton_Click"></shell:ApplicationBarIconButton>
            <shell:ApplicationBarIconButton x:Name="appbar_cancelButton" IconUri="/Images/AppBar/cancel.png" Text="cancel" Click="appbar_cancelButton_Click"></shell:ApplicationBarIconButton>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
